FROM robd003/python3.10 as builder
COPY ./ /yg_crm_py
WORKDIR /yg_crm_py
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/ && \
pip config set install.trusted-host mirrors.aliyun.com  && \
pip install -r requirements.txt && \
sed -i.bak 's/192.168.88.89/127.0.0.1/g' config.yaml


FROM fundingsocietiesdocker/python3.10-slim
MAINTAINER tony <wuyong@winning.com.cn>

COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /yg_crm_py /yg_crm_py
COPY ./tornado_start.sh /tornado_start.sh
USER root
RUN chmod +x -R /yg_crm_py /tornado_start.sh

EXPOSE 8000
ENTRYPOINT ["/tornado_start.sh"]




